package org.newdawn.yapgame;

/**
 * Interface of a process manager responsible for managing and executing several 
 * processes.
 *  
 * @author Marko Walther
 */
public interface IProcessManager 
{
	/**
	 * Adds given process and starts it.
	 * @param process the process
	 */
	public void add( Process process );

	/**
	 * handles all currently managed processes within current frame. 
	 * Executes and/or terminates them appropriately.
	 * @param delta time (in milliseconds) since last frame
	 */
	public void handleProcesses( long delta );
	
	/**
	 * Removes given process and terminates it (if its not already terminated).
	 * @param process the process
	 */
	public void remove( Process process );
	
	/**
	 * Remove and terminate all managed processes and terminates them 
	 * (if they are not already terminated).
	 */
	public void removeAll();
}
